package com.xmx.mapper;

import com.xmx.entity.Chances;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface IChancesMapper {

    //查询所有销售机会信息
    @Select("select * from chances")
    List<Chances> queryChances();

    //根据id查询销售机会信息
    @Select("select * from chances where chanId=#{chanId}")
    Chances queryChancesById(int id);

    //修改销售机会信息
    @Update("update chances set chanName=#{chanName},chanRate=#{chanRate},chanLinkMan=#{chanLinkMan},chanLinkTel=#{chanLinkTel},chanTitle=#{chanTitle},chanDesc=#{chanDesc} where chanId=#{chanId}")
    void updateChances(Chances chances);
}
